﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TA.Turbo.Controls
{
	public class LevelRangeMapping : BaseTemplateMapping
	{
		#region PUBLIC
		#region INIT
		public LevelRangeMapping()
		{
			this.StartLevel = 0;
			this.EndLevel = 500;
		}
		#endregion
		#region EVENTS
		#endregion
		#region PROPS
		public int StartLevel { get; set; }
		public int EndLevel { get; set; }
		public override int Weight
		{
			get
			{
				return 1000 - (this.EndLevel - this.StartLevel);
			}
		}
		#endregion
		#region METHODS
		public override NodeTemplate GetTemplate(TreeView treeView, int level)
		{
			if (level >= this.StartLevel && level <= this.EndLevel)
			{
				return treeView.GetTemplateById(this.TemplateId);
			}
			return null;
		}
		#endregion
		#endregion
		#region INTERNAL
		#region CONST/STATIC
		#endregion
		#region VARS
		#endregion
		#region PROPS
		#endregion
		#region METHODS
		#region INIT
		#endregion
		#region DATA
		#endregion
		#region HANDLERS
		#endregion
		#endregion
		#endregion
	}
}
